﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ARR.Entities;
using ARR.Model.Repositories;
using ARR.Entities.Gateways;

namespace ARR.Services.Domain
{
    public static class QueriesDomain
    {
        public static List<TopSalesCategory> GetTopSalesCategories()
        {
            var rows = QueriesRepository.SelectTopSalesCategories().ToList();

            List<TopSalesCategory> topCategories = rows.ConvertAll<TopSalesCategory>(c => new TopSalesCategory(c));
            
            return topCategories;
        }
    }
}
